<?php
/**
  * //w/w/w.s/h/u/o/t//u/p/u c/o/m  说 图/谱/源/码/分/享
 */
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/26 0026
 * Time: 下午 5:05
 */

defined("IN_IA")or exit("Access denied");
global $_GPC,$_W;
$uniacid=$_GPC['uniacid'];
$op=$_GPC['op'] ? $_GPC['op'] :"index";
$uid=$_GPC['uid'];
if($op=='getVetData'){
    $request=array();
    $vetData=pdo_getall('cqkundian_farm_vet',array('uniacid'=>$uniacid,'status'=>1));
    for ($i=0;$i<count($vetData);$i++){
        $vetData[$i]['certificate']=unserialize($vetData[$i]['certificate']);
    }
    $request['vetData']=$vetData;

    //判断是否开启了兽医板块
    $setCon=array(
        'ikey'=>array('vet_icon','vet_banner','vet_title','vet_english_title','is_open_vet'),
        'uniacid'=>$uniacid,
    );
    $setData=pdo_getall('cqkundian_farm_set',$setCon);
    $setDataList=array();
    foreach ($setData as $key => $value) {
        $setDataList[$value['ikey']]=$value['value'];
    }
    $request['setData']=$setDataList;
    echo json_encode($request);die;
}

